﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraLayout;
using DevExpress.XtraEditors;
using System.Reflection;

namespace DynamicCreateFilter
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            CreateItem();
        }
        public void CreateItem()
        {
            TextEdit control = new TextEdit();
            control.Name = "textEdit";
            // 
            // layoutControlItem1
            // 
            LayoutControlItem item = new LayoutControlItem();
            item.Control = control;
            item.CustomizationFormText = "layoutControlItem1";
            item.Location = new System.Drawing.Point(0, 0);
            item.Name = "layoutControlItem1";
            item.Size = new System.Drawing.Size(200, 24);
            item.Text = "系列";
            item.TextSize = new System.Drawing.Size(105, 14);

            TextEdit control1 = new TextEdit();
            control.Name = "textEdit1";
            // 
            // layoutControlItem1
            // 
            LayoutControlItem item1 = new LayoutControlItem();
            item1.Control = control1;
            item1.CustomizationFormText = "layoutControlItem1";
            item1.Location = new System.Drawing.Point(0, 24);
            item1.Name = "layoutControlItem1";
            item1.Size = new System.Drawing.Size(200, 24);
            item1.Text = "不良现象类型";
            item1.TextSize = new System.Drawing.Size(105, 14);

            TextEdit control2 = new TextEdit();
            control.Name = "textEdit2";
            // 
            // layoutControlItem1
            // 
            LayoutControlItem item2 = new LayoutControlItem();
            item2.Control = control2;
            item2.CustomizationFormText = "layoutControlItem1";
            item2.Location = new System.Drawing.Point(0, 48);
            item2.Name = "layoutControlItem1";
            item2.Size = new System.Drawing.Size(200, 24);
            item2.Text = "不良代码";
            item2.TextSize = new System.Drawing.Size(105, 14);

            layoutControlGroup1.Items.AddRange(new BaseLayoutItem[] { item, item1,item2 });
        }
    }
}
